import request from '@/utils/request'

// export function login(username, password) {
//   return http.service.request({
//     url: '/user/login',
//     method: 'post',
//     data: {
//       username,
//       password
//     }
//   })
// }
export function signUp(username, password) {
    return request({
        url: 'dsApi/signUp',
        method: 'post',
        data: {
            username,
            password,
        },
    })
}

export function login(username, password) {
    return request({
        url: 'dsApi/login',
        method: 'post',
        data: {
            username,
            password,
        },
    })
}

export function getInfo(token) {
    return new Promise((resolve, reject) => {
        let data = { "roles": ["admin"], "name": "admin", "avatar": "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif" };
        resolve(data);
    })
}